<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
  <title>乐优商城--我的订单</title>
  <link rel="icon" href="assets/img/favicon.ico">

  <link rel="stylesheet" type="text/css" href="css/webbase.css"/>
  <link rel="stylesheet" type="text/css" href="css/pages-seckillOrder.css"/>
</head>

<body>

<!-- 头部栏位 -->
<!--页面顶部，由js动态加载-->
<script type="text/javascript" src="plugins/jquery/jquery.min.js"></script>

<script type="text/javascript" src="js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-placeholder/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="js/widget/nav.js"></script>

</body>
<!--header-->
<div id="account">
  <div id="nav-bottom"></div>
  <ly-top></ly-top>
  <div class="py-container">
    <div class="yui3-g home">
      <!--左侧列表-->
      <div class="yui3-u-1-6 list">

        <div class="person-info">
          <div class="person-photo"><img src="img/_/1.jpeg" width="48" style="border-radius:24px" alt=""></div>
          <div class="person-account">
            <span class="name" style="line-height: 50px;color: red;margin-left: 10px">{{user.username}}</span>
          </div>
          <div class="clearfix"></div>
        </div>
        <div class="list-items">
          <dl @clic="showIndex=1">
            <dt><i>·</i> 订单中心</dt>
            <dd><a href="javascript:void(0)" @click="query.status=0" :class="{'list-active':query.status===0&&showIndex===1}">我的订单</a>
            </dd>
            <dd><a href="javascript:void(0)" @click="query.status=1" :class="{'list-active':query.status===1&&showIndex===1}">待付款</a>
            </dd>
            <dd><a href="javascript:void(0)" @click="query.status=2" :class="{'list-active':query.status===2&&showIndex===1}">待发货</a>
            </dd>
            <dd><a href="javascript:void(0)" @click="query.status=3" :class="{'list-active':query.status===3&&showIndex===1}">待收货</a>
            </dd>
            <dd><a href="javascript:void(0)" @click="query.status=4" :class="{'list-active':query.status===4&&showIndex===1}">待评价</a>
            </dd>
          </dl>
          <dl>
            <dt><i>·</i> 我的中心</dt>
            <dd><a href="javascript:void(0)" :class="{'list-active':showIndex===2}" @click.prevent="showIndex=2">我的收藏</a></dd>
            <dd><a href="javascript:void(0)" :class="{'list-active':showIndex===3}" @click.prevent="showIndex=3">我的足迹</a></dd>
          </dl>
          <dl>
            <dt><i>·</i> 物流消息</dt>
          </dl>
          <dl>
            <dt><i>·</i> 设置</dt>
            <dd><a href="javascript:void(0)" :class="{'list-active':showIndex===4}" @click.prevent="showIndex=4">个人信息</a></dd>
            <dd><a href="javascript:void(0)" :class="{'list-active':showIndex===5}" @click.prevent="showIndex=5">地址管理</a></dd>
            <dd><a href="javascript:void(0)" :class="{'list-active':showIndex===6}" @click.prevent="showIndex=6">安全管理</a></dd>
          </dl>
        </div>
      </div>
      <!--订单展示-->
      <div v-show="showIndex===1" class="yui3-u-5-6 order-pay">
        <div class="body">
          <div class="table-title">
            <table class="sui-table  order-table">
              <tbody>
              <tr></tr>
              </tbody>
              <thead>
              <tr>
                <th width="35%">宝贝</th>
                <th width="5%">单价</th>
                <th width="5%">数量</th>
                <th width="8%">商品操作</th>
                <th width="10%">实付款</th>
                <th width="10%">交易状态</th>
                <th width="10%">交易操作</th>
              </tr>
              </thead>
            </table>
          </div>

          <div class="order-detail">
            <div class="orders">
              <!--订单分页条-->
              <div class="choose-order">
                <div class="sui-pagination pagination-large top-pages">
                  <ul>
                    <li class="prev disabled"><a href="#">上一页</a></li>
                    <li class="next"><a href="#">下一页</a></li>
                  </ul>
                </div>
              </div>
              <!--订单列表-->
              <div>
                <div class="choose-title"><label data-toggle="checkbox" class="checkbox-pretty "><input type="checkbox"
                                                                                                        checked="checked">
                  <span>1970-06-27 16:53:32　订单编号：10010123410 <a>联系客服</a></span></label> <a
                    class="sui-btn btn-info share-btn">分享</a></div>
                <table class="sui-table table-bordered order-datatable">
                  <tbody>
                  <tr>
                    <td width="35%">
                      <div class="typographic"><img width="70px" height="70px"
                                                    src="http://img10.360buyimg.com/cms/s80x80_jfs/t2941/284/2460981288/184644/79d9d20b/57bd9890N73efbc30.jpg">
                        <a href="#" class="block-text">包邮 炫龙毁灭者DC 桌面级处理器 GTX950M 4G大显存 15.6英寸游戏笔记本电脑1</a> <span
                            class="guige">内存:16GB</span><span class="guige">CPU:i7</span></div>
                    </td>
                    <td width="5%" class="center">
                      <ul class="unstyled">
                        <li>¥4399.00</li>
                      </ul>
                    </td>
                    <td width="5%" class="center">1
                    </td>
                    <td width="8%" rowspan="2" class="center"><!----></td>
                    <td width="10%" rowspan="2" class="center">
                      <ul class="unstyled">
                        <li>¥5498.00</li>
                        <li>（含运费：￥0.00）</li>
                      </ul>
                    </td>
                    <td width="10%" rowspan="2" class="center">
                      <ul class="unstyled">
                        <li>等待买家付款</li> <!----> <!---->
                        <li><a href="home-orderDetail.html" class="btn">订单详情 </a></li>
                      </ul>
                    </td>
                    <td width="10%" rowspan="2" class="center">
                      <ul class="unstyled">
                        <li><a href="#" class="sui-btn btn-info">立即付款</a></li> <!----> <!----> <!---->
                        <li><a href="javascript:void(0)">取消订单</a></li>
                      </ul>
                    </td>
                  </tr>
                  <tr>
                    <td width="35%">
                      <div class="typographic"><img width="70px" height="70px"
                                                    src="http://img10.360buyimg.com/cms/s80x80_jfs/t2941/284/2460981288/184644/79d9d20b/57bd9890N73efbc30.jpg">
                        <a href="#" class="block-text">包邮 炫龙毁灭者DC 桌面级处理器 GTX950M 4G大显存 14.3英寸游戏笔记本电脑1</a> <span
                            class="guige">内存:8GB</span><span class="guige">CPU:i5</span></div>
                    </td>
                    <td width="5%" class="center">
                      <ul class="unstyled">
                        <li>¥1099.00</li>
                      </ul>
                    </td>
                    <td width="5%" class="center">1
                    </td> <!----> <!----> <!----> <!----></tr>
                  </tbody>
                </table>
              </div>
            </div>

            <div class="choose-order">
              <div class="sui-pagination pagination-large top-pages">
                <ul>
                  <li class="prev disabled"><a href="#">«上一页</a></li>
                  <li class="active"><a href="#">1</a></li>
                  <li><a href="#">2</a></li>
                  <li><a href="#">3</a></li>
                  <li class="dotted"><span>...</span></li>
                  <li class="next"><a href="#">下一页»</a></li>
                </ul>
                <div><span>共10页&nbsp;</span>
                  <span>
                    到
                    <input type="text" class="page-num"><button onclick="alert(1)"
                        class="page-confirm">确定</button>
                    页
                  </span></div>
              </div>
            </div>
            <div class="clearfix"></div>
          </div>

          <div class="like-title">
            <div class="mt"><span class="fl"><strong>热卖单品</strong></span></div>
          </div>
          <div class="like-list">
            <ul class="yui3-g">
              <li class="yui3-u-1-4">
                <div class="list-wrap">
                  <div class="p-img"><img src="img/_/itemlike01.png"></div>
                  <div class="attr"><em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em></div>
                  <div class="price"><strong><em>¥</em> <i>3699.00</i></strong></div>
                  <div class="commit"><i class="command">已有6人评价</i></div>
                </div>
              </li>
              <li class="yui3-u-1-4">
                <div class="list-wrap">
                  <div class="p-img"><img src="img/_/itemlike02.png"></div>
                  <div class="attr"><em>Apple苹果iPhone 6s/6s Plus 16G 64G 128G</em></div>
                  <div class="price"><strong><em>¥</em> <i>4388.00</i></strong></div>
                  <div class="commit"><i class="command">已有700人评价</i></div>
                </div>
              </li>
              <li class="yui3-u-1-4">
                <div class="list-wrap">
                  <div class="p-img"><img src="img/_/itemlike03.png"></div>
                  <div class="attr"><em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em></div>
                  <div class="price"><strong><em>¥</em> <i>4088.00</i></strong></div>
                  <div class="commit"><i class="command">已有700人评价</i></div>
                </div>
              </li>
              <li class="yui3-u-1-4">
                <div class="list-wrap">
                  <div class="p-img"><img src="img/_/itemlike04.png"></div>
                  <div class="attr"><em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em></div>
                  <div class="price"><strong><em>¥</em> <i>4088.00</i></strong></div>
                  <div class="commit"><i class="command">已有700人评价</i></div>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <!--我的收藏-->
      <collect v-show="showIndex===2"></collect>
      <!--我的足迹-->
      <foot-mark v-show="showIndex===3"></foot-mark>
      <!--个人信息管理-->
      <setting-info v-if="showIndex===4" ></setting-info>
      <!--地址管理-->
      <setting-address v-show="showIndex===5" ></setting-address>
      <!--密码管理-->
      <setting-safe v-if="showIndex===6" ></setting-safe>
    </div>
  </div>
  <div class="clearfix footer"></div>

  <foot></foot>

  <side-panel></side-panel>
</div>

<!--页面顶部，由js动态加载-->
<script src="./js/vue/vue.js"></script>
<script src="./js/axios.min.js"></script>
<script src="./js/common.js"></script>
<script src="./js/pages/shortcut.js"></script>
<script src="./js/pages/top.js"></script>
<script src="./js/pages/copyright.js"></script>
<script src="./js/pages/foot.js"></script>
<script src="./js/pages/side-panel.js"></script>
<script src="./js/pages/collect.js"></script>
<script src="./js/pages/footmark.js"></script>
<script src="./js/pages/settingInfo.js"></script>
<script src="./js/pages/settingAddress.js"></script>
<script src="./js/pages/settingSafe.js"></script>
<script src="./js/plugins/jquery/jquery.cookie.js"></script>
<script type="text/javascript">
  var vm = new Vue({
    el: "#account",
    data: {
      showIndex: 1, // 展示的页面内容：1.订单管理 2我的收藏，3我的足迹，4个人信息管理，5地址管理，6安全管理
      user: {},
      orders: [],
      query: {
        status: 0,
        page: 1,
        rows: 5
      }
    },
    created() {
      axios.get("/user/info/me")
        .then(resp => {
          this.user = resp.data;
          // 查询订单信息
          this.loadOrder();
        })
        .catch(() => this.gotoLogin())

    },
    methods: {
      gotoLogin() {
        window.location = "login.html?returnUrl=" + window.location;
      },
      loadOrder() {
        // 查询订单信息
        this.orders = [{
          orderId: 10010123410,
          totalFee: 549800,
          actualFee: 549800,
          status: this.query.status || 1,
          createTime: 15324812456,
          orderDetails: [
            {
              skuId: 10803521657,
              price: 439900,
              num: 1,
              image: "http://img10.360buyimg.com/cms/s80x80_jfs/t2941/284/2460981288/184644/79d9d20b/57bd9890N73efbc30.jpg",
              title: "炫龙毁灭者DC 桌面级处理器 GTX950M 4G大显存 15.6英寸游戏笔记本电脑1",
              specs: "{\"内存\": \"16GB\", \"CPU\":\"i7\"}"
            },
            {
              skuId: 20803521657,
              price: 109900,
              num: 1,
              image: "http://img10.360buyimg.com/cms/s80x80_jfs/t2941/284/2460981288/184644/79d9d20b/57bd9890N73efbc30.jpg",
              title: "炫龙毁灭者DC 桌面级处理器 GTX950M 4G大显存 14.3英寸游戏笔记本电脑1",
              specs: "{\"内存\": \"8GB\", \"CPU\":\"i5\"}"
            }
          ]
        }];
      },
      formatDate: ly.formatDate,
      formatPrice: ly.formatPrice,
      getTotalPrice(order) {
        return 549800;
      }
    }
  });
</script>
<script type="text/javascript">
  $(function () {
    $("#service").hover(function () {
      $(".service").show();
    }, function () {
      $(".service").hide();
    });
    $("#shopcar").hover(function () {
      $("#shopcarlist").show();
    }, function () {
      $("#shopcarlist").hide();
    });

  })
</script>
</html>